import inline as inline
import matplotlib
import pandas as pd
import numpy as np
import  matplotlib.pyplot as plt

data = pd.read_csv('creditcard.csv')
data.head()

# 分别计算不同的属性有多少个
count_classes = pd.Series(data['Class']).value_counts(sort=True).sort_index()
# 以柱状图的形式绘制出
plt.figure(figsize=(10, 10))
count_classes.plot(kind='bar')
plt.title("Fraud class histogram")
plt.xlabel("Class")
plt.ylabel("Frequency")
plt.show()